refactor repassword; fix 2