adding pwd functionality