added gradient tests