abstract away sharding algorithm