returnTitles() server function