Please simplify boolean logic here.