         }
         
         if let image = account.getImage() {
-            self.avatarImageView.image = image
-        }
+            updateAvatarImage(image)
+        }
+    }
+    
+    // MARK: Avatar image
+    
+    func setAccountImage(newImage:UIImage) {
+        
+        updateAvatarImageInView(newimage)
+        
+        // save the new image to disk
+        if let account = _account {
+            account.saveImage(newImage)
+        }
+    }
+    
+    /*! Set and style the avatar image */
+    func updateAvatarImageInView(image: UIImage) {
+        
+        avatarImageView.image = image
+        
+        // bordered with grey outlined circle, scale to fill
+        avatarImageView.contentMode = .ScaleAspectFill
+        avatarImageView.layer.cornerRadius = 90
+        avatarImageView.layer.borderWidth = 2
+        avatarImageView.layer.borderColor = UIColor.darkGrayColor().CGColor
+        avatarImageView.clipsToBounds = true
+        avatarImageView.backgroundColor = UIColor.blackColor()
     }
     
     /*! Display default avatar image. */

        avatarImageView.tintColor = UIColor.whiteColor()
        
        // bordered with grey outlined circle
        avatarImageView.layer.cornerRadius = 100
        avatarImageView.layer.borderWidth = 2
        avatarImageView.layer.borderColor = UIColor.darkGrayColor().CGColor
        avatarImageView.clipsToBounds = true
        
        avatarImageView.backgroundColor = UIColor.blackColor()
    }
    

                completionHandler(success:false, error:error, accountData: account)
            }
        }
    }
    
    /*! Upload account data to Kiva.org */
