fix getAssignments() function