add format option to save