implemented the server-client and database connections