Ordering of matrix elements fixed with new class, STEP1 can turn on or off output for testing
Step3 fixed, IDS[] redone