part 2 implemented