only one recursion mostly works