remove bad password function