adding threads sampl