refactor repassword