New Version including selection of contours