debugged hash.c