added hashPasword function