changed equality comparison in Dimension