added save_record and get_record