Guaranteed stability for nonlinear systems by means of a hybrid loop