rewriting dbase class, creating unittests