Added function to create map table