refactored assignee code to be cleaner