add function to connect to database