tidy up boolean ordering