Add adjustContrast function