Refactor, rename addAssignment to putAssignment