added more functions to new Contour class