pondering a recursive function