update on #94 to add memory