got segmentation working in separate worker thread