redesign and implement the sharding API.