convert to a package so the consul client can be split out