add inf checking for data3d