save/saveas functionality done