Refactoring a little bit , add event show when click on it