moved password function require