functions and profile