changed method name, implemented printing map