changes to hake.c
merged changes