make the non-recursion correct, but two cases time out;