refactored the test to be more correct