Tail array optimization; untested