finish thread demo, change dir structure