google account working
code cleanup with function generator