create helper function for generating base title