homework result
added the onMouseClicked handler