fixed up the memory reset, it all works now