refactoring - separate handler function
use "flag" package to get etcd-peer