added missing curly braces