there is no check for length here, so theoretically we could still be getting an empty array and this could would fail?