code for user class