finally fixed the bug that was preventing the thing from working (mutability problem).  Having a memory leak now, need to fix that