change usage calculation to multi thread