stabilization and refactoring