part1 implemented