do some code refine