         @_register_cbs ?= [opts.cb]
         if @_register_cbs.length > 1
             return
-        @_db.get_project_ids_with_user
-            account_id : opts.account_id
-            cb         : (err, projects) =>
+        @_db._query
+            query  : "SELECT project_id, json_agg(o) as users FROM (select project_id, jsonb_object_keys(users) AS o FROM projects WHERE users ? $1::TEXT) s group by s.project_id"
+            params : [opts.account_id]
+            cb     : all_results (err, x) =>
+                console.log(x)
                 if err
                     for cb in @_register_cbs
                         cb(err)
                     delete @_register_cbs
                     return
                 @_accounts[opts.account_id] = true
-                for project_id in projects
-                    @_add_user_to_project(opts.account_id, project_id)
+                for a in x
+                    if @_users[a.project_id]?
+                        # already have data about this project
+                        continue
+                    else
+                        for account_id in a.users
+                            @_add_user_to_project(account_id, a.project_id)
                 for cb in @_register_cbs
                     cb()
                 delete @_register_cbs


    # add and remove user from a project, maintaining our data structures (@_accounts, @_projects, @_collabs)
    _add_user_to_project: (account_id, project_id) =>
        if @_projects[account_id]?[project_id]
            return
        users = @_users[project_id] ?= {}

        if not @_match_condition(mesg[1])
            return
        if mesg[0] == 'DELETE'
            @emit 'change', {action:'delete', old_val:mesg[1]}
        else
            action = "#{mesg[0].toLowerCase()}"
            if @_watch.length == 0
                @emit 'change', {action:action, new_val:mesg[1]}
                return
            where = {}
            for k, v of mesg[1]
                where["#{k} = $"] = v
