change controller according server