change coding style and reformat