restructured routing technique; still not the best