starting the new implementation of solveSPTG