more tests and code for user class