main function added to ListMap