pthread added but not working