Better visibility algorithm