modified get_title method