add new database
fix some errors