made change for code review feedback: add curly braces around body