revamped the thread architecture