Added implementation of Tail recursion