fixing getTitle() method