part 5 and 6 finished (kind of, needs some more testing)