classic recursion prefix mistake