added option to use third host when both are down