getting events emiting to work