adding pthread