create task, internal refactor