added a convenience util extract attributes