Submitting this code. All 4 tests pass driver.