Master Controller code for ET project