use const char * instead of char
use std::thread instead of pthread