Gets history on front end and the data