Slight rearrangement of logic