make compare more flexible