use main thread also