Make helper function for figuring out titles