removed $table = $(table)
 - changed to instance.$table[0] -> instance.table