added grads and libgd