call compare function and log result