apparently, just missing the solution for the stack overflow problem