added compatibility with sharding