added part 8 code