more functionality to getdata.cs