refactor repassword; fix