Changing starshaped algorithm to have better worst-case performance