add coveragerc
use thread in test for coverage