return score, fixed contour bug