need to switch to pointxyz throughout