metaprogramming nightmare, which probably needs to be more meta-programmy to test CSP/promise unwrapping stuff... please read carefully, I'll add comments and stuff