made getData return a struct