better use of Array