refine code, unify the coding style