Put the tests in it's own function