create background thread