filled in the score function from pcl