Added content of extractTitle method