         newParent.familyName = "mum"
         
         let newParent1: Adult = NSEntityDescription.insertNewObjectForEntityForName("Adult", inManagedObjectContext: self.moc!) as! Adult
-        newParent.givenName = "dad1"
-        newParent.familyName = "mum1"
+        newParent1.givenName = "dad1"
+        newParent1.familyName = "mum1"
         
         let newBaby: Baby = NSEntityDescription.insertNewObjectForEntityForName("Baby", inManagedObjectContext: self.moc!) as! Baby
         newBaby.birthday = NSDate()
         newBaby.givenName = self.givenNameTextField.text
         newBaby.familyName = self.familyNameTextField.text
         newBaby.sex = self.sexSegmentedControl.selectedSegmentIndex
-
+        
         newBaby.addAdultsObject(newParent)
         newParent.addBabiesObject(newBaby)
         

         "Events",
         */
    ]

    @IBOutlet var thumbnailImageView: UIImageView!
    @IBOutlet var familyNameTextField: UITextField!
    @IBOutlet var givenNameTextField: UITextField!
    @IBOutlet var sexSegmentedControl: UISegmentedControl!
    @IBOutlet var tableView: UITableView!

    // MARK: - Setup
    
    override func viewDidLoad() {
        super.viewDidLoad()

        self.view.backgroundColor = UIColor.redColor()
        
        self.title = NSLocalizedString("NEW_BABY_TITLE", comment: "The title of the new baby view controller")

        // Thumbnail Image
        self.thumbnailImageView.userInteractionEnabled = true
        self.thumbnailImageView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(thumbnailTapped(_:))))

        self.familyNameTextField.text = self.baby?.familyName
        self.givenNameTextField.text = self.baby?.givenName
    }
    
    
    // MARK: - UITableViewDataSource
    
