changed "put" method name to "replace"