ha policy changes and refactoring
ha policy changes and refactoring