protected static int SizeOf(IList<Step> upstream)
{
if (upstream == null || upstream.Count == 0) throw new ArgumentException();
int length = upstream[0].Length;
if (!upstream.All(step => step.Length == length)) throw new ArgumentException();
return length;
}