more DB intergration and speedup