works with attribute names as strings