getting recursion to work