implemented gradient contrast