rewrite the database class get rid of the connect method using instead the constructor