updated module to attach DM and shallow toarray on change tracking