creating button to run loop