added support for filtering elements by a specified attribute