passing memory.as