improved threading and routing