calculation in own thread