A simple multi threading program - complete version