added support for custom attributes