matrix memory storage working