     }
     
     func getPopularRentalMovies() {
-        let RottenTomatoesURLString = "http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/top_rentals.json?apikey=" + api_key
+        let RottenTomatoesURLString = "http://api.rottentomatoes.com/api/public/v1.0/lists/movies/in_theaters.json?page_limit=16&page=\(current_page)&apikey=\(api_key)"
         let request = NSMutableURLRequest(URL: NSURL(string: RottenTomatoesURLString)!)
         NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue(), completionHandler:{ (response, data, error) in
             var actualError: NSError? = error

        navigationController!.navigationBar.titleTextAttributes = NSDictionary(objectsAndKeys:
            UIColor.yellowColor(), NSForegroundColorAttributeName)
        
        SVProgressHUD.show()
        getPopularRentalMovies()
    }

    override func didReceiveMemoryWarning() {

class AppViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
    
    let api_key = "hkn96husrzd5gp824dkcteqc"
    var current_page = 1
    var numResults = 0
    var movies: NSArray = NSArray()
    var refreshControl: UIRefreshControl! = UIRefreshControl()
    
    @IBOutlet weak var tableView: UITableView!
    @IBOutlet weak var networkErrorView: UIView!
