added pointcloud optimization