change to google style code and some performance improvements