consistentSet code