comparison implemented with tests