Implementation of Set.