refine code
resolve conflicts