change the parameter of refequals to const