added getTitle function