updated functions in php