made db connect to fix errors