added db connection code