initialize callbacks in initialize method in InMemory