add recursion with lines