added save to file function (12/8/13)