first lines for database and message handling and more ... hhmmm ... I should commit more often