Moved run_test into it's own method