completedarray refactor