done some refinement
done some refinement