refine code style