implementing contrast enhancement