     @collection().find(data, opts).toArray (err, docs)=>
       throw err if err
       if callback
-        results = []
-        if docs.length is 1
-          results = @create docs[0]
-        else
-          for doc in docs
-            results.push @create doc
+        results = @constructor.createModels docs
         callback err, results
 
   @findById: (id, callback) ->

    @collection().insert data, {w:1}, (err, docs) =>
      throw err if err
      if callback
        results = []
        if docs.length is 1
          for doc in doc
            results.push @create doc
        else
          results = @create docs[0]
        callback err, results

  update : (newObj , opts = {},callback) ->

  @create : ->
    throw 'this function must be overrided'

  @createModels : (docs)->
    throw 'docs must be array' if not _.isArray docs
    results = []
    if docs.length is 1
      for doc in docs
        results.push @create doc
    else
      results = @create docs[0]
    results
  @table : ->
    "#{@name.toLowerCase()}s"

