added event handling for mouseenter and mouseleave