add memory dump function
event driven now lol