map workaround for generator