updated memory example to work with api