modified database class