hash: major rework. iterator: fix function_output