clear only what is necessary