fixed typo in getData function