implement in-memory store