compare refactor and some tests