Add functionality for save.