Fixed the display function to work with hashmap design