DRY code for titles