Add getTitle function