changed controller to switch case, removed todo auto generated comments