stopping main thread
optimization of images processing