Code for DC project