fixed all curly braces in the program