refactoring user method into object creation file