added memory storage helper