trying to fix the recursive call