about to work on matrix subsetting and assignment
matrix element assignment behaving. Some optimizations to identify redundant arithmetic operations
removed print statement