 			
 			do{
 				let realm = try Realm()
+				guard let session = realm.object(ofType: Session, forPrimaryKey: sessionID)
 				
 				var dataPoint = DataPoint()
 				dataPoint.startTime = Date()

class ViewController: UIViewController {
	var profileID: String?
	var sessionID: String?
	
	var realmThread = DispatchQueue(label: <#T##String#>, qos: <#T##DispatchQoS#>, attributes: <#T##DispatchQueue.Attributes#>, autoreleaseFrequency: <#T##DispatchQueue.AutoreleaseFrequency#>, target: <#T##DispatchQueue?#>)
	
	var hud: HudViewController?
	let nodeRadius = 1.0

				}
				
				try realm.write{
					session?.dataPoints.append(dataPoint)
				}
				
			}catch{
