put back the main in tests