getting memories from callback functions