Added setAttributes() to instantiate()