before clean up