first version (in-memory only)