finished C construction code with interface adjustment