finalised Map class, and provided testing example