minor js rearrangement