tired working on getData function