add cleanup() method