rewrite some classes functions in the user model