trying to fix memleaks
remove aggregating function from hash computation