implemented saving and reading contour sets