getdata finction declaration