I changed this so I supply the header data first before I pass everything into the front end