MouseEvent sesparated from the main js file and CustomEvent implemented