better wire algorithms