recursing on tails