added database library and database class