refactor sharding to use Coordinator