cleaned up and xtendified getData()