significant update to bring the script in line with the data currently being collected for the web