Added code to connect with the database