benchmark tweaks, there is a bug in foreach though