add "type" attribute.
Merge pull request #41 from yields/master

add "type" attr.