MasterController now connects to the db and passes it down