Added helper method for title generation