Added part 6 code