add contour plotting code as header-only