moved db connection to single file, fix iss18