working for more than 8 way points