this code takes raw data and converts them to html tables