added save() function to save content