Comparing logic implemented, and working correctly