merge alex z's changes to referencescalefactors