factored out constructor from Condition.cs