tried to make events work