Add tail recursive method