added braces around assignment in order to avoid any side effects