testing mousePressed instead of mouseclicked