C version of recursion added