added multithread on resize