implement and achieve the functionality of save to disk