this compiles, but gets subscript exceptions