Add check of stable state
Add rme calculating