need to fix database