added `bounce` generator function