fixed a lint error by adding curly braces for block