correcting use of hexdigest method