add 'type' attribute to item