store y values not x values, simplified logic