update multistability
update code to more consitent
updated from master