Better way to test for success