added save data method