fixed errors and added map type segmented control