Added tag handling to getdata

we need to test this stuff