changed .NET stack to generic stack