oy vey ._. refactor code closer to google style guidelines