new mouseeventlistener and start implementing flags