playing with tail recursion