rewrite the whole testing structure