adding angular switch logic