main adapted, datahandler constructor, dbHandler implemented