refactoring google controller