set up structure to enforce memory management
better memory management should now be leak free