refactor server selection

fix: #3