clear mind function, debugging in events