connected the communication from the database to the UI