improved test compare