initial hash implementation