improved pwd setting