added braces for readability