logic simplifications