made models and connections to the database