added on click listener for spinner