use Write method
Merge pull request #18 from NoahShen/master

use Write method