any way to speed up array access?