add implementations of `Eq` and `Ord`