A modified Lyapunov method and its applications to ODE