     }
     
     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

                self.tableView.hidden = true
            } else {
                var responseDict = NSJSONSerialization.JSONObjectWithData(data, options: nil, error: &actualError) as NSDictionary
                self.movies = responseDict["movies"] as NSArray
                self.tableView.reloadData()
            }
            SVProgressHUD.dismiss()
        })
    }
    
    func getMovieDetails(indexPath: NSIndexPath) -> NSDictionary {
        return movies[indexPath.row] as NSDictionary
    }
}

        navigationController!.navigationBar.titleTextAttributes = NSDictionary(objectsAndKeys:
            UIColor.yellowColor(), NSForegroundColorAttributeName)
        
        self.refreshControl.attributedTitle = NSAttributedString(string: "Pull to refersh")
        self.refreshControl.addTarget(self, action: Selector("refresh"), forControlEvents: UIControlEvents.ValueChanged)
        self.tableView.addSubview(refreshControl)

        SVProgressHUD.show()
        getPopularRentalMovies()
        SVProgressHUD.dismiss()
    }

    override func didReceiveMemoryWarning() {
