adding mouse events functions and listeners