have to rethink the database connection handling
database connection is now established from main()