creating loc_ref