change noop to a generator function