Sentec Code as delivered

This is the code we received from Sentec January 2013