starting to integrate implicit matrix data structure into code