Space Shooter Tutorial ending the game, Application.loadLevel is obsolete?

In the tutorial it has you write the following code in the the gamecontroller to restart the game. Unity says that Application.LoadLevel (Application.loadedLevel); is obsolete. It says to use SceneManager. I’m new to unity and I am not sure how to do so. Any one know how to fix this? or is there an udated tutorial I don’t know about? thanks guys
void Update ()
{
if (restart)
{
if (Input.GetKeyDown (KeyCode.R))
{
Application.LoadLevel (Application.loadedLevel);
}
}
}

using UnityEngine;
using System.Collections;

public class GameController : MonoBehaviour
{
public GameObject hazard;
public Vector3 spawnValues;
public int hazardCount;
public float spawnWait;
public float startWait;
public float waveWait;

public GUIText scoreText;
public GUIText restartText;
public GUIText gameOverText;

private bool gameOver;
private bool restart;
private int score;

void Start ()
{
    gameOver = false;
    restart = false;
    restartText.text = "";
    gameOverText.text = "";
    score = 0;
    UpdateScore ();
    StartCoroutine (SpawnWaves ());
}

void Update ()
{
    if (restart)
    {
        if (Input.GetKeyDown (KeyCode.R))
        {
            Application.LoadLevel (Application.loadedLevel);
        }
    }
}

IEnumerator SpawnWaves ()
{
    yield return new WaitForSeconds (startWait);
    while (true)
    {
        for (int i = 0; i < hazardCount; i++)
        {
            Vector3 spawnPosition = new Vector3 (Random.Range (-spawnValues.x, spawnValues.x), spawnValues.y, spawnValues.z);
            Quaternion spawnRotation = Quaternion.identity;
            Instantiate (hazard, spawnPosition, spawnRotation);
            yield return new WaitForSeconds (spawnWait);
        }
        yield return new WaitForSeconds (waveWait);

        if (gameOver)
        {
            restartText.text = "Press 'R' for Restart";
            restart = true;
            break;
        }
    }
}

public void AddScore (int newScoreValue)
{
    score += newScoreValue;
    UpdateScore ();
}

void UpdateScore ()
{
    scoreText.text = "Score: " + score;
}

public void GameOver ()
{
    gameOverText.text = "Game Over!";
    gameOver = true;
}

}

They changed the way you load levels in newer versions of Unity 5, now you need to have this at the top of your script:

using UnityEngine.SceneManagement;

Then, you use

SceneManager.LoadScene(string sceneName);

To load scenes. You can also create new scenes directly through script now as well which was a much needed feature.