use before to refactor print-test