implements save to function
Merge pull request #10 from Hilaryous/save_to

implements save to function