improve testing mode