added back the type attribute