created get_title() to make the it easier to handle empty queries.