         
         //store the created chatroom c1 into global variable cR1
         cR1 = c1
+
         
         /********* End of Dummy data *********/
         

        
        
        //Create user u3
        let u3:User = User(context: context, id: "3", username: "GeorgeP", avatar: UIImage(named: "Default-Avatar")!, status: User.Status.ONLINE, timezone: NSTimeZone.systemTimeZone())
        
        //Create some messages for u3
        let msg12:Message = Message(id: "12", text: "Message 12 from GeorgeP", tstamp: NSDate(timeInterval: randomTime(), sinceDate: NSDate()), user: u3)

        //Set bottomIndexpath to last cell's index
        bottomIndexPath = NSIndexPath(forRow: cR1!.messages.count-1, inSection: 0)
        mainTableview.scrollToRowAtIndexPath(bottomIndexPath, atScrollPosition: UITableViewScrollPosition.Bottom, animated: true)
      
        //fix for tableview not scrolling all the way to the bottom in iOS 9
        mainTableview.reloadData()
        
