further developed mouse click handling