         ) -> MKAnnotationView!{
             
             
-            if annotation is CustomerAnnotation {
-                let pinAnnotationView = MKPinAnnotationView(annotation: annotation, reuseIdentifier: "myPin")
-                var ownerID:String = annotation.subtitle!!
-                var name = annotation.title!
-                
+            if let a = annotation as? CustomerAnnotation {
+                let pinAnnotationView = MKPinAnnotationView(annotation: a, reuseIdentifier: "myPin")
+                //let ownerID:String = a.subtitle!
+                let name = a.title!
+                let ownerID:String = (a.spot.owner?.objectId)!
                 let pic = UIImageView (image: UIImage(named: "test.png"))
                 pinAnnotationView.canShowCallout = true
-                pinAnnotationView.draggable = true
+                pinAnnotationView.draggable = false
                 pinAnnotationView.canShowCallout = true
                 pinAnnotationView.animatesDrop = true
                 pinAnnotationView.pinColor = MKPinAnnotationColor.Purple
                 
                 
-                var query = PFUser.query()
+                let query = PFUser.query()
                 
-                do{ var user = try query!.getObjectWithId(ownerID) as! PFUser
+                do{ let user = try query!.getObjectWithId(ownerID) as! PFUser
                     if let userPicture = user["Image"] as? PFFile {
                         userPicture.getDataInBackgroundWithBlock { (imageData: NSData?, error: NSError?) -> Void in
                             if error == nil {
                                 pic.image = UIImage(data:imageData!)
-                            
                             }
                         }
                     }

                    
                }
                catch{
                   //Throw an exception
                }
               
                pinAnnotationView.leftCalloutAccessoryView = pic
                pic.frame = CGRectMake(0, 0, 40, 40);

                
                
                return pinAnnotationView
                
            }

            return nil
    }
    
    

    
