fixed the comparison operator