got a save and open function working