added deriving Eq to Ref