using a map to store and retrieve objects