added method to print hashmaps