almost working. hitting recursion depth