I'm pretty sure you can just get rid of the second function (the failure condition) entirely.