added modulo_text function and associated playback code