in-memory implementation