use the dbms class, shorten code