refactored switch memtable to keep prior guarantees