nice use of a fail_count and recursion!