refactoring google map cod