did some coding style correction