Can you give me a sample code please. Never done threading!!