changes to rate algorithm, and minor packet realignment