refactor clean up test