averages out the distractions and puts them into an array, created input
boxes in index.html