moved custom functions
 moved custom functions