added throw to setpassword