with array order function