move hashes switch() to User class