added save() operation for recording