improve events display and events managements in the pseudo js file