convert to int before comparison