added map printing functionality -- verified correctness of map