add Gradient class and first tests