initial added custom functions and cake php