created title helper function