added hash function for pw