adds event handlers for spinner