No, actually not: The comparisons were reversed! This even confused me, so I have attempted to clarify this by renaming the functions and adding more comments.