clean up code in user model