more int->bool refactoring