delete all papers and add middleware based on OpenThreads