generalize recently added subset.* functions