Getting stuck in the boolean operations