improve test functions