refactor task assignment to assignment