added functionality to switch between maps