@tailrec added
rename inner @tailrec method