adding some functions to cakephp