refactored stabilize