remove warnings that "add explicit braces to avoid dangling else"