changes in clear data logic.