adding in pwd functionality