added save() method