some ref changes