restructure harness code