added working map view funciton