add functions to user model