start of data into js, fixing inconsistent structure in data