remove switch from template parsing