added map drawing functionality to draw function