created an object to format data to pass to the front end