more flexible save method
Merge pull request #1 from maximzxc/master

more flexible save method