code for saving of interactive input data