refactoring, code reformat