demo codes for exercise