reorganization to support a proper build order