some refinement
merged