corrected some errors

std::pairl<bool, Point> instead of optional<Point>