Added db query limit and table