remaked drawMap function. Still testing.