Added odering and canonicalize methods