added addAssignment functionality