added maximum thread count