brace corrections

added and removed braces trying to get them right