Using the compare function directly