replaced point3d with pvector