add some functions to user model