refactoring del_password