script for connecting to DB