Consider refactoring put() into this method since this is the only place it is called, and also "name" parameter is being passed to it anyway...