moved processing to separate thread + fixed s.o.