handle wait([], fn)