refactor: helper routine for timeout transitions