change to google c++ style of name&fixed some bug