changed mouseclicked to mousepressed