add applyg reuse version of arrayg