added some saveAs functionality. more tests