cleaned the tests into a separate script