works with in-memory storage