slight refactoring of booleans