added renderMap function