major refactoring and added getting user data