Refactor output lookup from connected