add recursive functions
add testcases for recursion