Improve testing procedure