add save_record method