add pthread sample code as a starting point