added mode switch and centered map