started implementation of gradients for SMGPR