indentation change and added a wrapper for google map event registering