there's a risk that you'll have [1] be out of bounds.  This probably needs a guard of some type.