assign line numbers in Java
add test for tail recursion