Added addAssignment method (for undoing changes)