a simple refactoring and click event now availiable