edit to data so that y0 updates correctly