add a little cleanup code