part 1 implemented