use short-circuit ops (|| and &&) as opposed to (| and &) to avoid warnings in Octave (and save time)