added mouse event handling