fix indentation and add braces