adding function in user models