add and test function fix database, now db works fine;
add and test function fix database, now db works fine;