add little comments to getData function