add memory support