chapter2 of thesis almost finished. nsgt routines updated to work with latest version of nsgt toolbox