added curly braces to make the code more consistent