                 print("creating cloudant picture document...")
                 CloudantSyncClient.SharedInstance.createPictureDoc(caption, fileName: imageName, url: imageURL, ownerID: FBUserID, width: "\(image!.size.width)", height: "\(image!.size.height)")
                 
-                self.imageCount = self.imageCount - 1 //decrement number of images to upload remaining
+                imageCount-- //decrement number of images to upload remaining
                 //check if test is done (all photos uploaded)
-                if (self.imageCount == 0) { 
+                if (imageCount == 0) {
                     CloudantSyncClient.SharedInstance.pushToRemoteDatabaseSynchronous()
                     self.xctExpectation?.fulfill() //test is done if all images added
                 }

            let image = UIImage(data: photoNSData)
            
            XCTAssertNotNil(image)
            // Upload Image
            
        //push to object storage, then on success push to cloudant sync
        ObjectStorageDataManager.SharedInstance.objectStorageClient.uploadImage(FBUserID, imageName: imageName, image: image!,
            onSuccess: { (imageURL: String) in

    
    var imageNames: [String: String]!
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
