pushes and pops the recursor stack and returns a promise