Added gradients support