clean up updating shard state
remove code duplication in getColumns