Realized feature to input sizes of map.
Fixed bug: creating new object and not removing older object.