adding db stuff
fixed db connection