plotcontrast function added