refactor before_save on user_model