how to return to main loop instead of function after interrupt?