changes are good after testing a run with 1 basis function. Ready for merging