refactoring for create user task, cleanup