change code accordingly to google code style