intermediate commit to get access to memory using ruby lambda
now, the memory behaves dynamically, still to remove testing code
remove testing code, no need to now pass memory as parameter, see prev commit