Putting booleans in order