Trying to format the data so its easty to create a JSON output