added check for empty set fo attrs