Add attribute function to create attributes.