Abstract boolean logic into methods