used example from xerial, switvhced to in-memory