separate the extraText from the main function