added code to perform data cleanup