 		        (do
                ;if master and all the nodes have written to the sync point, write the new assignments and set the partition flag to nil
                (if (is-master!? connector host topic)
-                 (if (>= (count (empheral-ls connector (sync-point-path-keys connector topic))) (count (get-remote-members connector)))
-                   (let [members (get-member-keys connector)]
+                 (if (>= (count (empheral-ls connector (sync-point-path-keys connector topic))) (count (get-partition-members connector topic)))
+                   (let [members (get-member-keys connector topic)]
                      ;delete all keys in sync path
                      (doseq [ks (empheral-ls connector (sync-point-path-keys connector topic))]
                        (empheral-del connector (:path ks)))
                      ;set the assignments and un set the partition flag
                      (empheral-set connector (assignments-path topic) (distribute-ids members ids))
                      (empheral-del connector (partition-flag-path topic)))
-                   (info  "sync keys " (empheral-ls connector (sync-point-path-keys connector topic)) " members " (map :path (get-remote-members connector))))
+                   (prn  "sync keys " (empheral-ls connector (sync-point-path-keys connector topic)) " members " (map :path (get-partition-members connector topic))))
                  )
                
                (if (is-partition-flag? connector topic)

     (apply hash-map (interleave  (set members) (partition-all d (set ids)))))))


(defn- is-master!? 
  "Get a lock on $topic/master if the lock is not attained it means this host is not the master"
  [connector host topic]

      ;(prn ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> set syncpoint path " (sync-point-path connector host topic) )
      (empheral-set connector (sync-point-path connector host topic) nil)
      ;run join because the host must be a meber for the algorithm to work
      
      ;loop in partition flag, only the master can unset the partition flag      
		  (loop [c 0]
