Added c helper function