changed def to block