added scale field to Data struct