Created box click function