working to get data in correct format