adding solution for part1