Modifications on the SG approach, still not working well, implementation of the visualization of i=f(sigma)