added gradiants as per descusion