changed mouseClicked to mousePressed