add db class and modify front end pages