add cleanup logic