Replaced filtering with set modifications.