Refactor: extract GetTitles func