reformat the source code and fix the newline problem