minor rearrangements of code, nothing significant