Started adding logic to save data