modify ref file