moving array definitions outside the function so they do not need to be redefined each time