fixed closed braces problem