added support for data attributes if available instead of classes