Try to optimize all with the use of Thread.