fully functional path stability code added