editing works now after adding an if not nil block around tableview.reloaddata