Added alternative manner to add click event listener