 
     _squash_patches: (opts) =>
         opts = defaults opts,
+            string_id : required
+            value     : required
+            timestamp : required
             to_delete : required
-            string_id : required
-            last_sync : required
-            timestamp : required
             cb        : undefined
         @dbg("_squash_patches", "string_id=#{opts.string_id}")
         async.series([
             (cb) =>
                 # write big new patch
-                patch = diffsync.dmp.patch_make('', opts.last_sync)
+                patch = diffsync.dmp.patch_make('', opts.value)
                 @db.update
                     table : 'syncstrings'
                     set   :

                string.live = diffsync.dmp.patch_apply(patch, string.live)[0]
                string.emit('change')

            # If live != last_sync, write changes back to database
            if string.live != string.last_sync
                write_updates = true

        if write_updates
            #@dbg("_process_updates","writing our own updates back")
            # safe to call skipping lock, since we have the lock
            @_write_updates_to_db (err) =>
                cb(err, true)
        else
            #@dbg("_process_updates","no further updates from us (stable)")

                            string.last_sync = string.live
                            string.applied_patches[timestamp] = {patch:patch, timestamp:timestamp}
                            string.timestamp = timestamp
                            string.patch_counter += 1
                            if string.patch_counter >= DB_PATCH_SQUASH_THRESH
                                @squash_old_patches
                                    string_id : string_id
                                    cb        : cb
                            else
                                cb()
        async.map(string_ids, f, (err) => cb(err))

    read_updates_from_db: (opts) =>
        opts = defaults opts,
