split shards function; parameterize read