move logic into thread