Updated to run only on click