Adding pdata/ydata correctly wip.