make a more elegant pipeline for the test case.