Fixed bug in part 4. Results look identical to expected now.