Required Functionality c code