minor rearranging