connected everything to the database