Geometic solution to part 2