Code for control panel project