doco corrected, terminates correctly now
little correction
matrix doesn't try to access to shared memory anymore