added check for empty set of attrs