Parsing Error- SimpleMove

This is my first game and its in 3D. I was trying to put in the SimpleMove code that I found on this link: Unity - Scripting API: CharacterController.SimpleMove
and I keep getting a parsing error with this code:

using UnityEngine;
using System.Collections;

[RequireComponent(typeof(CharacterController))]
public class ExampleClass : MonoBehaviour {
	public float speed = 3.0F;
	public float rotateSpeed = 3.0F;
	void Update() {
		CharacterController controller = GetComponent<CharacterController>();
		transform.Rotate(0, Input.GetAxis("Horizontal") * rotateSpeed, 0);
		Vector3 forward = transform.TransformDirection(Vector3.forward);
		float curSpeed = speed * Input.GetAxis("Vertical");
		controller.SimpleMove(forward * curSpeed);

If you’ve really pasted all of your code, you’re missing two closing braces at the bottom. The first one closes off the Update() method and the second one closes off the ExampleClass class.