Working and tested script for Coach (version 1.0.3)