other method to register in outer scope
tests
rewritten with prototypes. support for not async functions
benchmarks against original flow-js