Control script for TED