allow ref to be a string