changed open to getdata