adding competition code and controls