more refactoring to get less onRegionChange