implemented 3d, next move z