simplify enable/disable if statements