worked on rescoreAssignment()