Added re-implementation of select and each