Solution to Part3