Added getData function. Can't get it to work correctly.