fixing closing brackets