added cleanAssignments() method to controller