got db working!!! mostly