added write decl
Merge pull request #5 from sgn11/master

added write decl