draft of top-level linking driver loop