functions save and getTitles