new sample codes in threading package