added important method to user.rb