why we are declaring as global resetData and at the same time dropping it? sounds strange