Add forEach method

Fixes issue #5