Changed so that an array is being passed into the page insted of an psql query object
still need to fix how data is retrived from the array