updated format of functions