Added Time exceeded check