refactor braces