Added Functionality to control code