Changed prev to seed for more useful/less confusing calculations.