created classes and database connection