added more efficient representation of sets of expressions