Rewrote b function to decrease recursion and increase time to stack overflow