Creating custom functions using code routines