added cached-memory code