reoginize boolean ops into seperate functions