corrected indentation
moved curly brackets newline