simplified mouseClicked method