Checkpoint 2 : Modified put() and get() to be compatible with iterate() method.