Is this :next_app used? Could you just return true? In this way function would be easier to understand