updated and modified for hash.c also made hash.c