add error frequency
fix database