solving part 1