creating user and small refactor