added a truckt where the kernel and S tables can be stored. Started with implementation of the calculation of S. An error is still there. Not sure if this is due to not filling the array or pointer related stuff.