change from too deep recursion in print