added shared pointers
successfully get allstates (for the simple model)