initial code before cleanup