commit step 10 and refactor test