tried to coarsen recursion more and try inline recursion again