added gradient

added gradient