removed unnecessary objects and reformated createUser