adding in .NET code to build model