Part 1 code actually works now and passes all tests