A bit more work on #2

 This seems to be more safe, writing a function to do this for me without doing hacky call-y stuff.