Refactor, change add() to put().