first line of codes on stability computation