use an array instead of reading the contents of a file