Measurement of the W mass and width in e $^+$e $^-$ collisions at 189 GeV