added refine.sh