added a save feature to the library