reworking some code to use the User class and methods