made dispatcher generic