Thread Sample modified