huge change, add stack memory version for HashMap