working version of compare