function to add the support for reading maps