Add contains function to Dimensions