modified mk_studyref
study_ref again"