dispatcher: update to use recursion