refactor: extract fn
adds after_all() and tests are passing