Rewriting to use an IList instead, untested