make coordinator into a template class, for testing