continued working on LSI code, restructured a bit