initial code for controller-based dispatch